package com.github.prontera.test;

import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

import com.google.gson.Gson;

public class FormulaIm implements Formula {
	@Override
	public double calculate(int a) {
		   return sqrt(a * 100);
	}
	public static void main(String[] args) {
	/*	FormulaIm formulaIm=new FormulaIm();
		double c=formulaIm.calculate(100);
		System.out.println(c);
		double b=formulaIm.sqrt(16);
		System.out.println(b);*/
		
		List<String> names = Arrays.asList("peter", "anna", "mike", "xenia");

	/*	Collections.sort(names, new Comparator<String>() {
		    @Override
		    public int compare(String a, String b) {
		        return a.compareTo(b);
		    }
		});*/
		
	/*	Collections.sort(names, (String a, String b) -> {
		    return a.compareTo(b);
		});*/
		
		Collections.sort(names, (y,z) -> y.compareTo(z));
		
		Gson gson=new Gson();
		
		System.out.println(gson.toJson(names));
	}


}
